<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCommunityTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('community', function (Blueprint $table) {
            $table->id();
            $table->string('avatar')->comment('头像');
            $table->string('title',100)->comment('社区名称');
            $table->unsignedInteger('province_id')->default(0)->comment('省');
            $table->unsignedInteger('city_id')->default(0)->comment('市');
            $table->unsignedInteger('district_id')->default(0)->comment('区');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('community');
    }
}
